<template>
  <div class="error-page">
    <div class="error-code">404</div>
    <div class="error-message">页面未找到</div>
    <el-button type="primary" @click="goHome">返回首页</el-button>
  </div>
</template>

<script setup lang="ts">
import { useRouter } from 'vue-router'

const router = useRouter()

const goHome = () => {
  router.push({ path: '/' })
}
</script>

<style scoped>
.error-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100vh;
  text-align: center;
}

.error-code {
  font-size: 10rem;
  font-weight: bold;
}

.error-message {
  font-size: 1.5rem;
  margin-bottom: 2rem;
}
</style>
